home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1995-04-10 | 7.6 KB | 290 lines | [ TEXT/MPS ]
/* ------------------------------------------------------------------------------ FILENAME ChooserSupport.r DESCRIPTION This module contains the ImageWriter LQ constants, types, and resources that are needed in order for the driver to work with the Chooser. Note: all resources should be designated to load into the system heap. COPYRIGHT Copyright Apple Computer, Inc. 1992-1994 All rights reserved. 12/20/93 - dmh - Sync'd with the shipping 1.0b3 GX driver. 8/28/94 - dmh - Sync'd with the shipping 1.0.1 GX driver. -------------------------------------------------------------------------------- */ // System 7.0 Compatible #define SystemSevenOrLater 1 // Include System Resource Definitions #include "Types.r" #include "SysTypes.r" // Include the ImageWriter LQ driver constants that are used in the resources #include "Resources.h" // Include the public QuickDraw GX printing files #include "PrintingResTypes.r" // Include the ImageWriter LQ Driver's LDEF and PACK Code Segments ===== */ include "IWLQ_PACK"; include "IWLQ_LDEF"; /********************************************************************************************* THINGS TO CONTROL THE DEFAULT CHOOSING MECHANSIM *********************************************************************************************/ // The 'look' resource is used by the driver's PACK to know how to communicate // to the device. This resource contains the default settings, as the actual value // can be found in the desktop printer. resource 'look' (kLookRsrcID, sysheap, purgeable) { 2, // use the first in our list by default { "AppleTalk", kPAPCommRsrcID, isAppleTalk, "LQ"; "Serial", kSerialCommRsrcID, iconCells, "Modem Port"; "Servers", kPrinterShareCommRsrcID, isAppleTalk+isPrinterShare, "ImageWriterLQIS"; }; }; // This 'comm' resource defines the default communication settings when using this // driver with PrinterShare. resource 'comm' (kPrinterShareCommRsrcID, sysheap, purgeable) { PrinterShare { "", 0 }; }; // This 'comm' resource defines the default communication settings when using this // driver with PAP communications. resource 'comm' (kPAPCommRsrcID, sysheap, purgeable) { PAP { 1, "", 0, 0, 0, 0 }; }; // This 'comm' resource defines the default communication settings when using this // driver with direct Serial communications. resource 'comm' (kSerialCommRsrcID, sysheap, purgeable) { Serial { baud19200, /* Output baud rate */ noParity, /* Output parity */ oneStop, /* Output stop bits */ data8, /* Output data size */ 0x00010000, /* Output handshaking (hardware handshaking) */ 0x00000000, baud19200, /* Input baud rate */ noParity, /* Input parity */ oneStop, /* Input stop bits */ data8, /* Input data bits */ 0, /* Input handshaking */ 0, 1024, /* Input buffer size */ ".AIn", /* Input driver name */ ".AOut" /* Output driver name */ }; }; /********************************************************************************************* STANDARD CHOOSER PACK STUFF *********************************************************************************************/ // NBP Lookup type (maxed out so resource file won't need updating) resource 'STR ' (-4096, sysheap, purgeable) { "XXXXXXXXXXXXXXXXXXXXXX"; }; // NBP timeout value type 'GNRL' { byte; // timeout byte; // retries }; resource 'GNRL' (-4096, sysheap, purgeable) { 11, 5 }; // title string (we'll put a control here, so we don't want a title) resource 'STR ' (-4091, sysheap, purgeable) { ""; }; // "left" button title resource 'STR ' (-4093) { "Create"; }; // rectangle list resource 'nrct' (-4096, sysheap, purgeable) { { {112, 251, 132, 311}; // left button {0,0,0,0}; // right button {-101, 180, -101+20, 400}; // on button (location of device list - popup is placed here) {0,0,0,0}; // off button {0,0,0,0}; // button label }; }; // Menu used to select between direct connect, AppleTalk, and Servers resource 'MENU' (-4096, sysheap, purgeable) { -4096, textMenuProc, 0xFFFFFFFF, enabled, "", { } }; // Pop-up control used to select between direct connect printers and those being shared on the network resource 'CNTL' (-4096, sysheap, purgeable) { {0, 0, 20, 213}, // zero based control location 0, // Title options 0 = Left justified visible, // Should we display the control? 95, // Title Width -4096, // 'MENU' to display popupMenuCDEFproc+popupFixedWidth, // CDEF = CDEFID * 16 + varCode 0, // refCon = ResType to append = None "Connect via:" // Control title }; resource 'DITL' (-4096, sysheap, purgeable) { { {3, 238, 23, 238 + 213}, Control {enabled, -4096}, }; }; resource 'DITL' (-4095, sysheap, purgeable) { { /* array DITLarray: 2 elements */ /* [1] */ {143, 310, 163, 368}, Button { enabled, "OK" }, /* [2] */ {23, 87, 119, 377}, StaticText { disabled, "This printer driver could not be used.\n\n" "Quitting one or more applications and then " "trying again may allow you to use this " "printer driver." } } }; resource 'ALRT' (-4095, sysheap, purgeable) { {30, 30, 30+175, 30+380}, -4095, { /* array: 4 elements */ /* [1] */ OK, visible, sound1, /* [2] */ OK, visible, sound1, /* [3] */ OK, visible, sound1, /* [4] */ OK, visible, sound1 }, alertPositionParentWindowScreen }; //----------------------------------------------------------------------------------- // CHOOSER PACK HELP RESOURCES //----------------------------------------------------------------------------------- /* Any Chooser package can get balloons on all items that are normally added to the Chooser dialog by containing a STR# resource of resource ID = PackResID (-5694) and following the convention below: resource 'STR#' (-5694, sysheap, purgeable) { { "kEnabledLeftButton"; // message for button (or control) that is Enabled but not checked "kDisabledLeftButton"; // message for the control that is Disabled "kCheckedLeftButton"; // message for the control that is Checked (ie CtrlValue>0) "kOtherLeftButton"; // message for the control that is Other (ie CtrlValue>1) "kEnabledRightButton"; "kDisabledRightButton"; "kCheckedRightButton"; "kOtherRightButton"; "kEnabledOnButton"; "kDisabledOnButton"; "kCheckedOnButton"; "kOtherOnButton"; "kEnabledOffButton"; "kDisabledOffButton"; "kCheckedOffButton"; "kOtherOffButton"; "kEnabledOnOffTitle"; "kDisabledOnOffTitle"; "kCheckedOnOffTitle"; "kOtherOnOffTitle"; } }; This is a horrible Chooser hack for 7.0 - but we'll follow along in GX. */ resource 'STR#' (-5694, sysheap, purgeable) { { "Click here to create a desktop printer for the selected device."; // message for button (or control) that is Enabled but not checked "You have not selected a device to create, or there is not enough memory to create a desktop printer at this time."; // message for the control that is Disabled ""; // message for the control that is Checked (ie CtrlValue>0) ""; // message for the control that is Other (ie CtrlValue>1) ""; // kEnabledRightButton ""; // kDisabledRightButton ""; // kCheckedRightButton ""; // kOtherRightButton "Use this pop–up menu to select the type of connection for the desktop printer you are creating."; ""; // kDisabledOnButton ""; // kCheckedOnButton ""; // kOtherOnButton ""; // kEnabledOffButton ""; // kDisabledOffButton ""; // kCheckedOffButton ""; // kOtherOffButton ""; // kEnabledOnOffTitle ""; // kDisabledOnOffTitle ""; // kCheckedOnOffTitle ""; // kOtherOnOffTitle } };